using System;
using System.Data;
using System.Collections;
using APP.QUANLY.Common;

namespace RMAS.DAL
{
    /// <summary>
    /// Summary description for DM_ITEMTYPE.
    /// </summary>
    public class DM_ITEMTYPE
    {
              private string _ItemType;
      private string _ItemTypeName;
      private QT_ITEMINOUTList _listQT_ITEMINOUT;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
	      public bool IsSetItemType; 
      public bool IsItemTypeNullable   
      { 
	 get { return false;  } 
      }
      public string ItemType
      {
         get { return _ItemType; }
         set 
	    { 
 		 _ItemType = value;
		IsSetItemType = true;
 	    }
      }
    public bool IsSetItemTypeName; 
    public bool IsItemTypeNameNullable   
    { 
		get { return false;  } 
    }
    public string ItemTypeName
    {
        get{ return _ItemTypeName;  }
        set
		{
			_ItemTypeName = value;
			IsSetItemTypeName = true;
		}
    }
public QT_ITEMINOUTList QT_ITEMINOUTList 
{ 
	get { return _listQT_ITEMINOUT; }
	set { _listQT_ITEMINOUT = value;}
}

        #endregion

        #region Constructors
        public DM_ITEMTYPE()
        {
            Reset();
        }
        public DM_ITEMTYPE(DM_ITEMTYPE obj)
        {
            	this._ItemType = obj.ItemType;
	this._ItemTypeName = obj.ItemTypeName;
        }
        #endregion

        public void Reset()
        {
                     _ItemType = EmptyValues.v_string;
         _ItemTypeName = EmptyValues.v_string;
	_listQT_ITEMINOUT = null;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["ItemType"] is DBNull))
		{
			obj.ItemType = (string)reader["ItemType"];
		}
                if(!(reader["ItemTypeName"] is DBNull))
		{
			obj.ItemTypeName = (string)reader["ItemTypeName"];
		}
//            _ItemType = (reader["ItemType"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["ItemType"];
//            _ItemTypeName = (reader["ItemTypeName"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["ItemTypeName"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(string ItemType, string ItemTypeName)
        {
                     this._ItemType = ItemType;
         this._ItemTypeName = ItemTypeName;
        }
    }
}